package cn.young.javalearning.designpattern.proxypattern.simpleproxy;

import cn.young.javalearning.designpattern.proxypattern.Shopping;

/**
 * 外卖小哥
 */
public class WaiMaiXiaoGe implements Shopping{

    public WaiMaiXiaoGe(Shopping shopper) {
        this.shopper = shopper;
    }

    private Shopping shopper;

    public void shopping() {
        before();
        shopper.shopping();
        after();
    }

    private void after() {
        System.out.println("把买到的东西送到顾客手上！！！");
    }

    private void before() {
        System.out.println("外卖小哥去超市。");
    }
}
